[DOC-13923] Clarify Behaviour When Field Names Contain Periods#575
[DOC-13923] Clarify Behaviour When Field Names Contain Periods#575sarahlwelton merged 6 commits intorelease/8.0from
Conversation
…hat used to point to customize-index.adoc to point to about-mappings.adoc, instead. Remove repetitive info from customize-index.adoc.
…wn the page. Update more links, this time for XATTRs mapping explanation
abhinavdangeti
left a comment
There was a problem hiding this comment.
@sarahlwelton I've added a few comments, let me also ping @capemox here (who set up the DOC ticket) so he can share his feedback on this as well.
| A type mapping includes or excludes specific documents in a collection from an index. | ||
| A document must match the collection and document type set by a type mapping to be included in a Search index. | ||
|
|
||
| You can control the type of a document by xref:search:set-type-identifier.adoc[setting a type identifier]. |
There was a problem hiding this comment.
Worth stating this is optional perhaps.
|
|
||
| === Collection Names | ||
|
|
||
| You cannot use a collection name that contains a period (`.`) in a Search index type mapping. |
There was a problem hiding this comment.
KV forbids this already - so it shouldn't be a problem downstream.
There was a problem hiding this comment.
Good to know - I'm going to tweak this to specify the "collection type mapping name", instead - because I still think it's worthwhile to explain how this mechanism works.
| You cannot use a collection name that contains a period (`.`) in a Search index type mapping. | ||
|
|
||
| The Search Service uses periods (`.`) to separate collection names from xref:search:customize-index.adoc#type-identifiers[type identifiers]. | ||
| If you used a collection name that contained a period, the Search Service would interpret anything after the period as a filter value on your type mapping. |
| include::example$about-mappings.jsonc[lines=1..8] | ||
| ---- | ||
|
|
||
| If you tried to create an object mapping for another object called `origin.country`, the Search Service would return results from that mapping alongside the nested `country` field in the `origin` object. |
There was a problem hiding this comment.
Not sure I quite follow this line.
- What ends up happening in this situation is we'd have same field index for both the fields with name -
origin.countryandcountrynested withinoriginfield mapping. - During evaluation of an analytic query, we could even fail to determine the right analyzer for
origin.countryifcountrywere not created withinorigin- leading to indeterministic behavior.
There was a problem hiding this comment.
Have taken another stab at explaining this - this breakdown was helpful :) The ticket was a little light on details on what the problematic mechanism actually was, so I admit I was somewhat guessing - lol.
…ngs and object names based on SME input
Rebecca-Martinez007
left a comment
There was a problem hiding this comment.
Just a broken link within the page to fix up, the rest LGTM!
| include::example$about-mappings.jsonc[lines=1..8] | ||
| ---- | ||
|
|
||
| Just like <<collection-names,>> and <<object-names,>>, to avoid undesired results in your Search queries, avoid using periods (`.`) in your child field names. |
There was a problem hiding this comment.
<<collection-names>> is broken here, I don't think [#collection-names] exists in this page.
There was a problem hiding this comment.
AH I think I missed deleting that when Abhi suggested I make some changes earlier. Thanks for catching that.
|
|
||
| XATTRs mappings can be <<static,static>> or <<dynamic,dynamic>>, based on whether you add <<fields,>>. | ||
|
|
||
| Just like <<collection-names,>>, <<object-names,>>, and <<fields,>>, to avoid undesired results in your Search queries, avoid using periods (`.`) in the names of fields in your document metadata. |
There was a problem hiding this comment.
Same comment here: <> is broken here, I don't think [#collection-names] exists in this page.
Ticket came in asking if we could clarify for users what happens when their field names contain periods and they try to use those with mappings in the Search Service.
Decided best course of action was a new page describing the mapping types in more details, with the impact periods have on each type.
Updated links and removed redundant info to support that.
Preview URL:
https://preview.docs-test.couchbase.com/docs-devex-DOC-13923-field-names-with-periods/server/current/search/about-mappings.html
You will need the Docs Team credentials on Confluence.